-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
白名单运行 #34
base: master
Are you sure you want to change the base?
白名单运行 #34
Conversation
58eff62
to
0eb77d0
Compare
oops |
0eb77d0
to
c8266f4
Compare
@@ -16,21 +16,29 @@ func SetUserPluginStatus(status bool, userID int64, plugin *manager.PluginCondit | |||
var key string | |||
if plugin != nil { | |||
key = plugin.Key | |||
} else { // plugin 为空,代表所有插件 | |||
key = AllPluginKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看了一下这里没有这种情况出现
PaimengBot/basic/ban/switch.go
Lines 53 to 58 in c8266f4
// 处理插件名 | |
plugin = findPluginByName(args[0]) | |
if plugin == nil { | |
ctx.Send(fmt.Sprintf("没有叫%v的功能哦,可以看看帮助", args[0])) | |
return 0, nil, period, fmt.Errorf("no such plugin %v", args[0]) | |
} |
@@ -51,21 +59,29 @@ func SetGroupPluginStatus(status bool, groupID int64, plugin *manager.PluginCond | |||
var key string | |||
if plugin != nil { | |||
key = plugin.Key | |||
} else { // plugin 为空,代表所有插件 | |||
key = AllPluginKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,传入参数不可能为nil
PaimengBot/basic/ban/switch.go
Lines 53 to 58 in c8266f4
// 处理插件名 | |
plugin = findPluginByName(args[0]) | |
if plugin == nil { | |
ctx.Send(fmt.Sprintf("没有叫%v的功能哦,可以看看帮助", args[0])) | |
return 0, nil, period, fmt.Errorf("no such plugin %v", args[0]) | |
} |
fix: 切换白名单后所有插件被禁用
ca5c341
to
e0875e2
Compare
等 #33 合了再弄,conflict太多了 |
No description provided.